/*
 * Copyright (c) 2019-2020, https://api.iot.10086.cn/(https://gitee.com/cmcc-iot-api/iot-card-open-application/).
 */
package cn.iot.card.open.sim.dto.general;

import cn.iot.card.open.constants.Constants;
import cn.iot.card.open.sim.dto.siminfo.SimInfoDTO;

/**
 * 单卡短信、语音功能 DTO
 */
public class SimFunctionDTO extends SimInfoDTO {

    private String accountId;

    /**
     * 操作类型：
     * 0：开
     * 1：停
     */
    private String operType;

    public String getAccountId() {
        return accountId;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    public String getOperType() {
        return operType;
    }

    public void setOperType(String operType) {
        this.operType = operType;
    }

    @Override
    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        switch (this.getCardType()) {
            case Constants.REQUEST_PARAM_MSISDN:
                stringBuilder.append("所查询的物联卡号码(MSISDN):").append(this.getCardNum()).append(",");
                break;
            case Constants.REQUEST_PARAM_ICCID:
                stringBuilder.append("集成电路卡识别码(ICCID):").append(this.getCardNum()).append(",");
                break;
            case Constants.REQUEST_PARAM_IMSI:
                stringBuilder.append("国际移动用户识别码(IMSI):").append(this.getCardNum()).append(",");
                break;
        }
        if ("0".equals(operType)) {
            stringBuilder.append("操作类型:").append("开");
        } else if ("1".equals(operType)) {
            stringBuilder.append("操作类型:").append("停");
        }
        return stringBuilder.toString();
    }
}
